Image processing program and image processing device for moving display area

ABSTRACT

A video game device calculates a difference vector extending from a predetermined reference position on the screen to an input position. Moreover, the video game device calculates movement parameter data used for moving, with respect to a fixed point in the virtual space uniquely determined based on a position of the controlled object, the point of sight to a position that is determined by a direction in the virtual space based on a direction of the difference vector and a distance in the virtual space based on a magnitude of the difference vector. The point of sight is moved based on the movement parameter data. The video game device produces an image based on a virtual camera, which has been moved according to the movement of the point of sight, and displays the image on the screen of a display device.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.14/491,562 filed Sep. 19, 2014; which is a continuation of U.S. patentapplication Ser. No. 11/339,568 filed Jan. 26, 2006, now U.S. Pat. No.8,866,856; which claims priority from Japanese Patent Application No.2005-154233 filed May 26, 2005. The disclosures of these priorapplications are incorporated herein by reference.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to an image processing program and animage processing device and, more particularly, to an image processingprogram and an image processing device, with which a portion of avirtual space to be displayed on the screen (“display area”) can bemoved.

Description of the Background Art

There are conventional video game devices and video game programs fordisplaying objects in a virtual space on the screen. For example, thereis a video game in which there are objects (characters) in athree-dimensional virtual game space, wherein the display area isdetermined so that primary objects will be shown within the screen (see,for example, “Nintendo Official Player's Guide—Dairanto Smash BrothersDX (Super Smash Brothers Melee)”, Shogakukan Inc., Jan. 20, 2002, p 4(Non-Patent Document 1)). This is a fighting video game in which thereare a plurality of characters, one of which is controlled by the player.The video game device automatically adjusts the position and thedirection of a virtual camera so that the characters are shown withinthe screen. An image of the game space taken by the virtual camera isdisplayed on the screen. Thus, the player can enjoy the game withoutlosing sight of the player character or the opponent character.

Depending on the nature of the video game, simply keeping all theprimary objects within the screen may not always give the best view forthe player. For example, in video games where the player charactershoots an arrow or a gun in a certain direction in the game space, moreof the area in that direction is preferably displayed on the screen.Specifically, in a case where the player character is to shoot an arrowin the upper right direction of the screen, the player character ispreferably displayed closer to the lower left corner of the screen sothat more of the area in the upper right direction from the playercharacter is displayed on the screen. This does not apply only to thosecases where the player controls the player character. In any case wherethe player performs an operation in a certain direction with referenceto a point in the game space, it is preferable for the player that moreof the area in that direction is displayed on the screen.

With the method of Non-Patent Document 1, however, the display area isdetermined based on a plurality of objects in the game space. Therefore,if there are no primary objects in a particular area in the game space,the displayed game space will not be centered about the particular areaeven if the player wishes to see the particular area. Thus, it is notpossible with this method to display the game space on the screen in apreferred manner for the player in such a case where the playercharacter shoots an arrow, for example.

SUMMARY OF THE INVENTION

Therefore, an object of the present invention is to provide an imageprocessing program and an image processing device in which the user isallowed to freely adjust the display area of a virtual space.

The present invention has the following features to attain the objectsmentioned above. Note that parenthetic expressions in the followingsection (reference numerals, supplementary explanations, etc.) aremerely to indicate the correlation between what is described in thefollowing section and what is described in the description of thepreferred embodiments set out further below in the presentspecification, and are in no way intended to restrict the scope of thepresent invention.

A first aspect of the present invention is directed to acomputer-readable storage medium storing an image processing program(video game program) to be executed by a computer (the CPU core 21,etc.) of an image processing device (the video game device 10) fordisplaying an image of a three-dimensional virtual space (game space)including an image of a controlled object (the player character 41)placed in the virtual space, which can be controlled by the user, byusing a virtual camera whose position is determined based on a point ofsight set in the virtual space. The image processing device includes aninput device (the touch panel 15) for outputting an input positioncorresponding to a point on a screen of a display device (the second LCD12) specified by the user. The image processing program instructs thecomputer to perform a position obtaining step (S13), a first calculationstep (S15), a second calculation step (S19 and S20), a movement controlstep (S24) and a display control step (S6). In the position obtainingstep, the computer obtains an input position (the point P3 shown in FIG.9) outputted from the input device. In the first calculation step, thecomputer calculates a difference vector (the vector V1 shown in FIG. 9)extending from a predetermined reference position (the point P2 shown inFIG. 9) on the screen to the input position. In the second calculationstep, the computer calculates movement parameter data (58) used formoving, with respect to a fixed point in the virtual space (the point p1shown in FIG. 13) uniquely determined based on a position of thecontrolled object, the point of sight to a position that is determinedby a direction in the virtual space based on a direction of thedifference vector and a distance in the virtual space based on amagnitude of the difference vector (see FIG. 13). In the movementcontrol step, the computer moves the point of sight based on themovement parameter data. In the display control step, the computerproduces an image based on the virtual camera, which has been movedaccording to the movement of the point of sight, and displaying theimage on the screen of display device.

According to a second aspect, in the second calculation step, positiondata representing a target point (the point p2 shown in FIG. 13) in thevirtual space is calculated as the movement parameter data. The targetpoint is determined, with respect to the fixed point, by a direction inthe virtual space based on the direction of the difference vector and adistance in the virtual space based on the magnitude of the differencevector. In the movement control step, the point of sight is moved to thetarget point.

According to a third aspect, in the movement control step, the point ofsight is moved so that the point of sight gradually approaches thetarget point.

According to a fourth aspect, in the second calculation step, themovement parameter data is calculated so that the controlled object willnot be outside the screen after the point of sight is moved.

According to a fifth aspect, the image processing program instructs thecomputer to further perform a detection step (S12) of detecting whetherthere is no longer an input to the input device. In the secondcalculation step, the movement parameter data used for moving the pointof sight to the fixed point is calculated when it is detected in thedetection step that there is no longer an input.

A sixth aspect of the present invention is directed to acomputer-readable storage medium storing an image processing program(video game program) to be executed by a computer (the CPU core 21,etc.) of an image processing device (the video game device 10) fordisplaying an image of a three-dimensional virtual space (game space)including an image of a controlled object (the player character 41)placed in the virtual space, which can be controlled by the user, byusing a virtual camera whose position is determined based on a point ofsight set in the virtual space. The image processing device includes aninput device (the touch panel 15) for outputting an input positioncorresponding to a point on a screen of a display device (the second LCD12) specified by the user. The image processing program instructs thecomputer to perform a position obtaining step (S13), a first calculationstep (S15), a second calculation step (S19 and S20), a movement controlstep (S24) and a display control step (S6). In the position obtainingstep, the computer obtains an input position (the point P3 shown in FIG.9) outputted from the input device. In the first calculation step, thecomputer calculates a difference vector (the vector V1 shown in FIG. 9)extending from a predetermined reference position (the point P2 shown inFIG. 9) on the screen to the input position. In the second calculationstep, the computer calculates movement parameter data (58) used formoving, with respect to a fixed point in the virtual space (the point p1shown in FIG. 13) uniquely determined based on a position of thecontrolled object, the display area to a position that is determined bya direction in the virtual space based on a direction of the differencevector and a distance in the virtual space based on a magnitude of thedifference vector. In the movement control step, the computer moves thedisplay area based on the movement parameter data. In the displaycontrol step, the computer displays, on the display device, an image ofthe virtual space within the display area.

According to a seventh aspect, in the second calculation step, themovement parameter data is calculated as being position datarepresenting a target point in the virtual space (the point p2 shown inFIG. 13) that is determined, with respect to the fixed point, by adirection in the virtual space based on the direction of the differencevector and a distance in the virtual space based on the magnitude of thedifference vector. In the movement control step, the display area ismoved so that a predetermined point in the display area coincides withthe target point.

According to an eighth aspect, in the movement control step, the displayarea is moved so that the predetermined point in the display areagradually approaches the target point.

According to a ninth aspect, in the second calculation step, themovement parameter data is calculated so that the controlled object willnot be outside the screen after the display area is moved to the targetpoint.

According to a tenth aspect, the image processing program instructs thecomputer to further perform a detection step (S12) of detecting whetherthere is no longer an input to the input device. In the secondcalculation step, the movement parameter data used for moving thedisplay area so that the fixed point is displayed at the referenceposition is calculated when it is detected in the detection step thatthere is no longer an input.

According to an eleventh aspect, the second calculation step includes aspace vector calculation step (S19) and a target point setting step(S20). In the space vector calculation step, the computer calculates aspace vector (the vector v1 shown in FIG. 13), being a vector in thevirtual space, based on the difference vector. In the target pointsetting step, the computer sets the target point at a position of an endpoint of the space vector with respect to the fixed point. The spacevector calculation step further includes a first correction step (S16and S17) of correcting at least one of the difference vector and thespace vector so that a magnitude of the space vector is less than orequal to a predetermined upper limit value.

According to a twelfth aspect, the second calculation step includes aspace vector calculation step (S19) and a target point setting step(S20). In the space vector calculation step, the computer calculates aspace vector, being a vector in the virtual space, based on thedifference vector. In the target point setting step, the computer setsthe target point at a position of an end point of the space vector withrespect to the fixed point. In the space vector calculation step, acomponent of the space vector with respect to a first direction in thevirtual space (the z-axis direction shown in FIG. 13) is calculatedbased on a component of the difference vector with respect to a thirddirection on the screen (the Y-axis direction shown in FIG. 13), and acomponent of the space vector with respect to a second directionperpendicular to the first direction (the x-axis direction shown in FIG.13) is calculated based on a component of the difference vector withrespect to a fourth direction perpendicular to the third direction (theX-axis direction shown in FIG. 13).

According to a thirteenth aspect, the virtual space has a predeterminedplane (the ground 43) on which the controlled object can be moved. Thevirtual camera has a viewing direction being perpendicular to the seconddirection and with an angle of depression of less than 90° with respectto the predetermined plane. The third direction is parallel to adirection of a straight line displayed on the screen extending in thefirst direction through the point of sight. The space vector calculationstep includes a second correction step of correcting at least one of thedifference vector and the space vector so that a proportion of thecomponent of the space vector in the second direction with respect tothe component of the space vector in the first direction is greater thana proportion of the component of the difference vector in the fourthdirection with respect to the component of the difference vector in thethird direction.

The present invention may be carried out in the form of an imageprocessing device having substantially the same function as thatrealized by executing an image processing program as set forth above.

According to the first or sixth aspect, the display area is movedaccording to the input position specified by the player. Thus, theplayer is allowed to move the display area by using a pointing devicecapable of detecting an input position on the screen. The differencevector used for determining the amount by which the display area is tobe moved is calculated based on the reference position and the inputposition on the screen, whereby the magnitude thereof is limited.Therefore, the area across which the display area is moved can belimited to a predetermined area centered about the fixed point, wherebythe display area will not be at a position far away from the fixedpoint. For example, if the fixed point is set at or near the position ofthe controlled object, the player can move the display area across anarea centered about the controlled object.

According to the second or seventh aspect, by setting the target point,it is possible to easily move the display area according to the inputposition specified by the player, irrespective of the current positionof the display area.

According to the third or eighth aspect, it is possible to prevent theabrupt movement of the display area, which may be difficult for theplayer to follow. The abrupt movement of the display area may seem tothe player to be a switching of a virtual space image from one toanother, which may be difficult for the player to follow. In contrast,according to the third or seventh aspect, the display area is movedgradually, whereby it is possible to display the game image in apreferred manner for the player without causing the player to feel likethe game image is switched from one to another.

According to the fourth or ninth aspect, it is possible to keep thecontrolled object always displayed within the screen.

According to the fifth or tenth aspect, the player can easily bring thedisplay back to the state where the fixed point is displayed at thereference position by discontinuing the input to the input device.Therefore, it is possible to improve the playability in moving thedisplay area.

According to the eleventh aspect, the magnitude of the space vector usedfor setting the target point is limited to a value less than or equal tothe upper limit value. Thus, if the upper limit value is set to anappropriate value, it is possible to keep the controlled object alwaysdisplayed within the screen.

According to the twelfth aspect, the space vector can be calculated by asimple method based on the difference vector. This eliminates the needfor a complicated calculation, such as the conversion from thetwo-dimensional screen coordinate system to the three-dimensionalvirtual space coordinate system, whereby it is possible to calculate theposition of the target point with a small amount of calculation.

According to the thirteenth aspect, the virtual camera is set with anangle of depression of less than 90° with respect to the predeterminedplane. If the proportion between the component of the space vector inthe third direction and the component thereof in the fourth direction isthe same as the proportion between the component of the differencevector in the first direction and the component thereof in the seconddirection, the player may feel awkward when the display area is moved.Specifically, the player may feel that the amount by which the displayarea is moved in the first direction of the screen is too small. Incontrast, according to the eleventh aspect, it is possible to reducesuch awkwardness that may be felt by the player by correcting thedirection of the difference vector or the space vector.

These and other objects, features, aspects and advantages of the presentinvention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 generally shows a video game device according to an embodiment ofthe present invention;

FIG. 2 shows an internal configuration of the video game device;

FIG. 3 shows an exemplary game screen according to the embodiment of thepresent invention;

FIG. 4 shows a game screen after the display area has been moved fromthe position of FIG. 3;

FIG. 5 schematically shows a virtual three-dimensional game space;

FIG. 6 shows important data stored in a RAM 24 of a video game device10;

FIG. 7 is a flow chart showing a game process performed by the videogame device 10;

FIG. 8 is a flow chart showing the detailed flow of step S5 shown inFIG. 7;

FIG. 9 illustrates the process of step S15 shown in FIG. 8;

FIG. 10 illustrates the process of step S16 shown in FIG. 8;

FIG. 11 illustrates the process of step S17 shown in FIG. 8;

FIG. 12 illustrates the process of step S18 shown in FIG. 8;

FIG. 13 illustrates the process of step S19 shown in FIG. 8;

FIG. 14 illustrates the process of step S23 shown in FIG. 8;

FIG. 15 shows the game screen immediately after the player performs atouch input operation; and

FIG. 16 shows the game screen a predetermined number of frames afterFIG. 15 while the input position has remained unchanged.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

An image processing program and an image processing device according toan embodiment of the present invention will now be described. First, aconfiguration of a portable video game device 10, being an example of animage processing device for executing an image processing program (videogame program), will be described. FIG. 1 generally shows the video gamedevice 10. Referring to FIG. 1, the video game device 10 includes afirst LCD (Liquid Crystal Display) 11 and a second LCD 12. A housing 13includes an upper housing 13 a accommodating the first LCD 11, and alower housing 13 b accommodating the second LCD 12. The first LCD 11 andthe second LCD 12 both have a resolution of 256×192 dots. While LCDs areused in the present embodiment, the display device may be of any othersuitable type, e.g., an EL (Electro Luminescence) display device.Moreover, the resolution of the first LCD 11 and the second LCD 12 isnot limited to the particular resolution used herein.

The upper housing 13 a includes sound slits 18 a and 18 b therein forallowing the sound from a pair of speakers (30 in FIG. 2) to bedescribed later to pass therethrough.

The lower housing 13 b includes a set of input devices, including across-shaped switch 14 a, a start switch 14 b, a select switch 14 c, anA button 14 d, a B button 14 e, an X button 14 f, a Y button 14 g, an Lbutton 14L and an R button 14R. Another input device is a touch panel 15attached on the screen of the second LCD 12 (as indicated by a two-dotchain line in FIG. 1). The lower housing 13 b includes a power switch 19and slots for accommodating a memory card 17 and a stylus 16 (asindicated by one-dot chain lines in FIG. 1).

The touch panel 15 may be any of various types of touch-sensitivepanels, including a resistive film touch panel, an optical (infrared)touch panel and a capacitance-coupling touch panel. The touch panel 15is capable of outputting position data corresponding to the contactpoint on the surface thereof, at which it is being touched with thestylus 16. The touch panel 15 outputs the position data by detecting theinput position (input coordinates) specified by the player at apredetermined sampling interval. While it is assumed herein that theplayer uses the stylus 16 to operate the touch panel 15, it isunderstood that the touch panel 15 may be operated with a pen (styluspen) or a fingertip instead of the stylus 16. In the present embodiment,the touch panel 15 has a resolution (detection precision) of 256×192dots, which is equal to the resolution of the second LCD 12. Notehowever that it is not necessary that the resolution of the touch panel15 is equal to that of the second LCD 12.

The memory card 17 is a storage medium storing a video game program, andis received by the slot in the lower housing 13 b.

Referring now to FIG. 2, an internal configuration of the video gamedevice 10 will be described. Referring to FIG. 2, a CPU core 21 ismounted on an electronic circuit board 20 accommodated in the housing13. The CPU core 21 is connected to a connector 23, an input/outputinterface circuit (referred to simply as an “I/F circuit”) 25, a firstGPU (Graphics Processing Unit) 26, a second GPU 27, a RAM 24 and an LCDcontroller 31, via a bus 22. The connector 23 can receive the memorycard 17. The memory card 17 includes therein a ROM 171 storing a videogame program, and a RAM 172 rewritably storing backup data. The videogame program stored in the ROM 171 of the memory card 17 is loaded tothe RAM 24, and the loaded video game program is executed by the CPUcore 21. In addition to the video game program, the RAM 24 also storestemporary data produced while the CPU core 21 is running the video gameprogram, and other data for producing game images. The I/F circuit 25 isconnected to the touch panel 15, the speakers 30, and a control switchsection 14 of FIG. 1 including the cross-shaped switch 14 a, the Abutton 14 d, etc. The speakers 30 are placed behind the sound slits 18 aand 18 b.

A first VRAM (Video RAM) 28 is connected to the first GPU 26, and asecond VRAM 29 is connected to the second GPU 27. In response to aninstruction from the CPU core 21, the first GPU 26 produces a first gameimage and renders it on the first VRAM 28, based on data stored in theRAM 24 for producing game images. Similarly, the second GPU 27 producesa second game image and renders it on the second VRAM 29 in response toan instruction from the CPU core 21. The first VRAM 28 and the secondVRAM 29 are connected to the LCD controller 31.

The LCD controller 31 includes a register 32. The register 32 stores avalue of 0 or 1 in response to an instruction from the CPU core 21. Whenthe value stored in the register 32 is 0, the LCD controller 31 outputsthe first game image rendered on the first VRAM 28 to the first LCD 11and outputs the second game image rendered on the second VRAM 29 to thesecond LCD 12. When the value stored in the register 32 is 1, the LCDcontroller 31 outputs the first game image rendered on the first VRAM 28to the second LCD 12 and outputs the second game image rendered on thesecond VRAM 29 to the first LCD 11.

The configuration of the video game device 10 described above is merelyan example, and the present invention is applicable to any computersystem having at least one display device. The video game program of thepresent invention may be supplied to the computer system via a wired orwireless communications line, instead of via an external storage mediumsuch as the memory card 17. Alternatively, the video game program may bepre-stored in a non-volatile storage device inside the computer system.

An outline of the game to be played by executing the video game programby the video game device 10 will now be described. In this game, thereare a player character controlled by the player and enemy characters ina three-dimensional virtual game space. The object of the game is forthe player to control the player character to attack and take down theenemy characters. Referring now to FIGS. 3 and 4, the outline of thegame will be described.

FIG. 3 shows an exemplary game screen according to the presentembodiment. Referring to FIG. 3, the image of an area of the game spaceincluding the player character 41 is displayed on the second LCD 12. Inthe present embodiment, the first LCD 11 may not be used, or may be usedto display various parameters indicating the physical strength and thecapabilities of the player character, or other information such as itemsowned by the player character.

Referring to FIG. 3, the player character 41 is displayed at the centerof the screen of the second LCD 12. In the present embodiment, theplayer character 41 is displayed at the center of the screen except whenperforming an operation of moving the display area (the details of whichwill be described later). The player character 41 can use items(weapons) such as a sword or a bow and arrow to attack an enemycharacter near the player character 41 with a sword or to shoot an arrowat an enemy character away from the player character 41. In this game,the player character 41 is allowed to use only one item at once, wherebythe player needs to play the game while switching items to be used bythe player character 41 from one to another. In the present embodiment,when the player character 41 is to use a bow and arrow, the player canmove the display area by making an input on the touch panel.

FIG. 3 shows a game screen where the player character 41 is ready to usea bow and arrow. In this situation, the player can move the displayarea. Specifically, the player using the stylus 16 specifies an intendedposition on the screen (on the input surface of the touch panel 15)based on which the display area is to be moved. For example, when theplayer is to shoot an arrow in the lower right direction of the screen,the player specifies, with the stylus 16, a position away from theplayer character 41 toward the lower right corner (i.e., the position atwhich a point P1 in the game space is displayed) as shown in FIG. 3.

FIG. 4 shows a game screen after the display area has been moved fromthe position of FIG. 3. When the player makes an input on the touchpanel 15, the video game device 10 detects the coordinates (inputcoordinates) of the position (input position) on the input surface ofthe touch panel 15 that is touched by the player. Then, the video gamedevice 10 calculates a two-dimensional vector (a difference vector to bedescribed later) extending from a predetermined reference position onthe screen to the input position. In this example, the referenceposition is the center of the screen. The display area is moved based onthis vector, the details of which will be described later. In FIG. 4,the display area has been moved so that the point P1, which is at theend of the vector in FIG. 3, is now displayed at the center of thescreen.

From FIG. 3 to FIG. 4, the display area has been moved in the lowerright direction. Thus, the area of the game space in the lower rightdirection from the player character 41 is chiefly displayed on thescreen. In other words, more of the area in the lower right direction,into which the player is to shoot an arrow, is displayed on the screen.Such a game screen is preferable for the player as it displays more ofthe area in the direction in which the player character 41 is to shootan arrow. For example, referring to FIG. 4, the player can now see anenemy character 42, which could not be found in the game screen of FIG.3. Because the player is allowed to freely move the display area, theplayer can more effectively attack enemy characters with a bow andarrow, thus improving the playability of the game.

The details of the game process to be performed by the video game device10 when executing the video game program will now be described. First,referring to FIG. 5, the virtual game space created in this game processwill be described. FIG. 5 schematically shows a virtualthree-dimensional game space. As shown in FIG. 5, a ground 43 is createdin the virtual three-dimensional game space, on which the playercharacter can be moved. The ground 43 is parallel to the xz plane of theworld coordinate system for representing positions in the game space.The virtual camera for displaying an image of the game space on thesecond LCD 12 is positioned so that the viewing direction (an arrow 45shown in FIG. 5) has a predetermined angle of depression with respect tothe ground. The angle of depression θ is set to be less than 90°.Moreover, the viewing direction of the virtual camera is parallel to thez axis when projected onto the xz plane. Therefore, an area of thevirtual space to be displayed on the screen (i.e., the area of which animage is taken by the virtual camera; hereinafter referred to as the“display area”) 46 is in a trapezoidal shape in the case of aperspective projection, and in a rectangular shape in the case of aparallel projection. The image of the game space taken by the virtualcamera is displayed on the screen so that the x-axis direction of thegame space coincides with the horizontal direction of the screen (theX-axis direction of the screen coordinate system), and the z-axisdirection of the game space coincides with the vertical direction of thescreen (the Y-axis direction of the screen coordinate system) in thecenter of the screen. Note that the screen coordinate system is acoordinate system with the upper left corner of the screen being theorigin, the downward direction of the screen being the positive Y-axisdirection, and the rightward direction of the screen being the positiveX-axis direction.

While the display area is not being moved, the point of sight of thevirtual camera is set to be the position of the player character 41.Therefore, in this case, the player character 41 is displayed at thecenter of the screen. A position 44 of the virtual camera is determinedbased on the position of the point of sight. In the present embodiment,the position of the virtual camera in the y-axis direction ispredetermined, and as the position of the point of sight moves, thevirtual camera moves in parallel to the xz plane without changing theviewing direction. Specifically, the amount by which the point of sightis moved with respect to the x-axis direction is equal to the amount bywhich the position 44 of the virtual camera is moved with respect to thex-axis direction, and the amount by which the point of sight is movedwith respect to the z-axis direction is equal to the amount by which theposition 44 of the virtual camera is moved with respect to the z-axisdirection.

Important data used in the game process will now be described withreference to FIG. 6. FIG. 6 shows important data stored in the RAM 24 ofthe video game device 10. Referring to FIG. 6, the RAM 24 storescharacter position data 50, item data 51, reference position data 52,input position data 53, difference vector data 54, upper limit valuedata 55, correction data 56, virtual camera data 57, movement parameterdata 58, movement vector data 59, etc. In addition to those shown inFIG. 6, the RAM 24 also stores other data necessary for the gameprocess, such as player character data (e.g., the image data and theposition data of the player character), and game space data (e.g., theterrain data).

The character position data 50 is data representing the position of theplayer character in the game space (character position). Specifically,the character position data 50 is a set of coordinates in the worldcoordinate system (three-dimensional coordinate system). The item data51 is data representing an item that can currently be used by the playercharacter. For example, when the player character is in a state where itis ready to use a bow and arrow, the item data 51 represents a bow andarrow.

The reference position data 52 is data representing a predeterminedreference position on the screen (screen reference position).Specifically, the reference position data 52 is a set of coordinates inthe screen coordinate system (two-dimensional coordinate system). Thereference position is predetermined by the video game program. In thepresent embodiment, the reference position is the center of the screen.The reference position data 52 is used for calculating the differencevector.

The input position data 53 is data representing the position on thescreen at which the player's input is detected by the touch panel 15(input position). Specifically, the input position data 53 is a set ofcoordinates in the screen coordinate system (two-dimensional coordinatesystem). The difference vector data 54 is data representing atwo-dimensional vector (difference vector) extending from the screenreference position to the input position.

The upper limit value data 55 is data representing the greatest possiblemagnitude of the difference vector (upper limit value). In the presentembodiment, if the magnitude of the difference vector calculated basedon the screen reference position and the input position exceeds theupper limit value, the magnitude of the difference vector is correctedto the upper limit value. The upper limit value is predetermined by thevideo game program. The correction data 56 is data representingmultipliers used for correcting the components (the X component and theY component) of the difference vector. The correction data 56 includesdata representing a multiplier used for correcting the X component (thefirst multiplier), and data representing another multiplier used forcorrecting the Y component (the second multiplier).

The virtual camera data 57 is data representing various parameters ofthe virtual camera. The parameters of the virtual camera include theposition of the virtual camera, the position of the point of sight, andthe viewing direction.

The movement parameter data 58 is data representing the direction inwhich the display area is to be moved and the amount by which it is tobe moved. Specifically, the movement parameter data 58 represents thecoordinates (target coordinates) of the position of the target point(target position) in the game space. The target point is a point towhich the point of sight of the virtual camera should be moved.Specifically, the movement parameter data 58 is a set of coordinatesrepresented by the world coordinate system. The movement parameter datais calculated based on the difference vector, the details of which willbe described later. In other embodiments, the movement parameter data 58may be vector data representing the direction in which the point ofsight is moved and the amount by which it is moved, or vector datarepresenting the direction in which the position of the virtual camerais moved and the amount by which it is moved.

The movement vector data 59 is data representing a vector (movementvector), which represents the direction in which the point of sight ismoved and the amount by which it is moved per unit time (e.g., perframe). The movement vector is calculated based on a vector from thecurrent position of the point of sight to the target position. While themovement vector is a three-dimensional vector, it may be atwo-dimensional vector made up of the x component and the z component ina case where the point of sight is moved only across the ground parallelto the xz plane.

Referring now to FIGS. 7 to 13, the details of the game process to beperformed by the video game device 10 when executing the video gameprogram will be described. FIG. 7 is a flow chart showing the flow ofthe game process performed by the video game device 10. When the powerof the video game device 10 is turned ON, the CPU core 21 of the videogame device 10 executes a boot program stored in a boot ROM (not shown),thus initializing various units such as the RAM 24. The video gameprogram stored in the memory card 17 is loaded to the RAM 24, and theCPU core 21 starts executing the video game program. The flow chart ofFIG. 7 shows the game process performed after the completion of theprocess described above. In the flow charts of FIGS. 7 and 8, parts ofthe game process related to the operation of moving the display area aredescribed in detail, and other parts of the game process that are notdirectly related to the present invention will not be described indetail.

In step S1 of FIG. 7, the game space is first created, wherein theplayer character and the enemy characters are placed at their initialpositions. The virtual camera is positioned to take the image of theplayer character and the surrounding portion of the game space, and thegame space as viewed from the virtual camera in the viewing direction isdisplayed on the second LCD. In step S2 (following step S1) and thesubsequent steps, a game operation input from the player using a touchpanel, or the like, is received, based on which the game proceeds. Theloop through steps S2 to S7 is repeated at a rate of one iteration perframe.

In step S2, the CPU core 21 obtains, from the control switch section 14,operation data indicating whether or not any of the control switches 14a, 14 f, 14R and 14L is being pressed. In step S3, the operation of theplayer character and the enemy characters is controlled. Specifically,the operation of the player character (including the movement operationand the attack operation) is determined based on the operation dataobtained in step S2. In a movement operation of the player character,the character position data 50 stored in the RAM 24 is updated toindicate the position after the movement. The operation of the enemycharacter is determined according to a predetermined algorithm in thevideo game program.

In step S4, an item used by the player character is determined. Theplayer character uses a bow and arrow while the L button 14L is beingpressed, and a sword while the L button 14L is not being pressed.Specifically, based on the operation data obtained in step S2, the CPUcore 21 determines whether or not the L button 14L is being pressed,according to which an item used by the player character is determined.Then, the item data 51 stored in the RAM 24 is updated to indicate theitem determined in step S4. Step S4 is followed by step S5.

In step S5, the display area determining process is performed. Thedisplay area determining process is a process of determining the displayarea based on the player's operation. Referring now to FIGS. 8 to 13,the details of the display area determining process will be described.

FIG. 8 is a flow chart showing the detailed flow of step S5 shown inFIG. 7. In the display area determining process, it is first determinedin step S11 whether or not the item used by the player character is apredetermined item (a bow and arrow in the illustrated example).Specifically, the CPU core 21 determines whether or not the item data 51stored in the RAM 24 indicates the predetermined item. If the item data51 indicates the predetermined item, the process proceeds to step S12.If the item data 51 indicates an item other than the predetermined item,the process proceeds to step S21.

In step S12, it is determined whether or not there is an input (touchinput) on the touch panel 15 from the player. Specifically, the CPU core21 reads data outputted from the touch panel 15 to determine whether ornot position data is being outputted from the touch panel 15. Ifposition data is being outputted from the touch panel 15, it isdetermined that there is a touch input and the process proceeds to stepS13. If data indicating that there is no input is being outputted fromthe touch panel 15, it is determined that there is no touch input andthe process proceeds to step S21.

In step S13, the input position is obtained. Specifically, the CPU core21 updates the input position data 53 stored in the RAM 24 to theposition data taken from the touch panel 15 in step S12. The positiondata before the update is separately stored in the RAM 24. Step S13 isfollowed by step S14.

In step S14, it is determined whether or not the input position obtainedin step S13 is different from the previous input position. Specifically,it is determined whether or not the input position indicated by theinput position data 53 updated in step S13 is different from that beforethe update. If it is determined in step S14 that the input position hasbeen changed, the process proceeds to step S15. If it is determined thatthe input position has not been changed, the process proceeds to stepS24 to be described later. In other embodiments, if the distance betweenthe input position before the update and the updated input position isless than or equal to a predetermined distance, it may be determinedthat the input position has not been changed, whereby the processproceeds to step S24.

In step S15, the difference vector is calculated. FIG. 9 illustrates theprocess of step S15 shown in FIG. 8. It is assumed herein that theplayer character 41 is displayed at the center of the screen as shown inFIG. 9. The difference vector is calculated as being a vector V1extending from the screen reference position (the position of the pointP2) to the input position (the position of the point P3). The inputposition is represented by the input position data 53 stored in the RAM24 in step S13. Thus, the CPU core 21 calculates the difference vectorusing the reference position data 52 and the input position data 53stored in the RAM 24. The calculated difference vector is stored in theRAM 24 as the updated difference vector data 54. Step S15 is followed bystep S16.

In step S16, it is determined whether or not the magnitude of thedifference vector calculated in step S15 is less than or equal to apredetermined upper limit value. The upper limit value is represented bythe upper limit value data 55 stored in the RAM 24. The CPU core 21performs the determination of step S16 referring to the differencevector data 54 and the upper limit value data 55 stored in the RAM 24.FIG. 10 illustrates the process of step S16 shown in FIG. 8. Themagnitude of the difference vector being less than or equal to the upperlimit value means that the position P3 of the end point of the vector V1shown in FIG. 10 is within an area 61 shown in FIG. 10. The area 61 is acircular area centered about the position P2 and having a radius equalto the upper limit value. Thus, the determination of step S16 isperformed by determining whether or not the input position P3 specifiedby the player is within the circular area 61 centered about the positionP2 on the screen. If it is determined in step S16 that the magnitude ofthe difference vector is greater than the predetermined upper limitvalue, the process proceeds to step S17. If it is determined that themagnitude of the difference vector is less than or equal to thepredetermined upper limit value, the process proceeds to step S18.

In step S17, the magnitude of the difference vector calculated in stepS15 is corrected to the upper limit value. FIG. 11 illustrates theprocess of step S17 shown in FIG. 8. As shown in FIG. 11, if theposition P3 of the end point of the vector V1 is outside the area 61,the difference vector is corrected to a vector V2. The vector V2 is avector with the same direction as the vector V1 but with the end pointbeing on the periphery of the area 61. In this process, the differencevector data 54 stored in the RAM 24 is updated to the difference vectoras corrected in step S17. Step S17 is followed by step S18.

The process of steps S16 and S17 is a process of limiting the magnitudeof the difference vector. If the magnitude of the difference vector isnot limited, moving the display area based on the magnitude anddirection of the difference vector may result in the player character 41being partly outside the screen. In view of this, in the presentembodiment, the magnitude of the difference vector is limited by theprocess of steps S16 and S17 so as to prevent the player character 41from being partly outside the screen. In order to always keep the playercharacter entirely within the screen, the upper limit value may be setto be slightly smaller than the shortest distance from the center of thescreen to an edge of the screen (the distance from the center of thescreen to the upper or lower edge of the screen in the example shown inFIG. 11). Specifically, the upper limit value may be set to be thedistance minus the width of the player character as displayed on thescreen.

In step S18, the values of the components (the X component and the Ycomponent) of the difference vector are corrected. Specifically, the CPUcore 21 multiplies the X component of the difference vector by the firstmultiplier and the Y component of the difference vector by the secondmultiplier. The first and second multipliers can be known by referringto the correction data 56 stored in the RAM 24. The CPU core 21 updatesthe difference vector data 54 stored in the RAM 24 to the differencevector as corrected in step S18.

FIG. 12 illustrates the process of step S18 shown in FIG. 8. In stepS18, the uncorrected difference vector V2 is corrected to a vector V3.Where the components of the uncorrected difference vector V2 are (LX,LY)and those of the corrected difference vector V3 are (dX,dY), (dX,dY) arecalculated by Expression 1 below:

dX=A1×LX

dY=A2×LY  Exp. 1

where A1 is the first multiplier and A2 is the second multiplier. In thepresent embodiment, 0<A1<1 and 0<A2<1. Moreover, A1<A2. Thus, the vectoris corrected so that the proportion of the Y component with respect tothe X component of the vector V3 is greater than that of the vector V2.In step S18, the correction operation may be performed only for the Xcomponent of the vector V2. In other words, A2=1.

In step S18, the vector is corrected so that the proportion of the Ycomponent with respect to the X component is increased from that of theuncorrected difference vector, in order to reduce the awkwardness thatthe player may feel when the display area is moved. The direction inwhich to move the display area in the game space is determined based onthe direction of the difference vector (step S21 to be described later),the details of which will be described later. Without the process ofstep S18, the player may feel awkward, as the amount by which thedisplay area is moved in the vertical direction of the screen (theY-axis direction) may seem to be too small. The process of step S18 isfor reducing such awkwardness.

In steps S19 and S20, following step S18, the position of the targetpoint, to which the point of sight should be moved, is determined basedon the difference vector. Specifically, the position of the target pointis determined according to the direction in the game space based on thedirection of the difference vector and the distance in the game spacebased on the magnitude of the difference vector.

In step S19, the CPU core 21 first converts the difference vector beinga two-dimensional vector on the screen to a three-dimensional vector inthe game space. FIG. 13 illustrates the process of step S19 shown inFIG. 8. In FIG. 13, a plane 62 is a two-dimensional plane onto which thegame space as viewed from the virtual camera is projected, andcorresponds to the screen on which the game space is displayed. Thevector V3 is the difference vector, a vector V3X represents the Xcomponent of the difference vector V3, and a vector V3Y represents the Ycomponent of the difference vector V3. A vector v1 is athree-dimensional vector obtained by converting the difference vectorV3, a vector v1 x represents the x component of the vector v1, and avector v1 y represents the y component of the difference vector v1. Thethree-dimensional vector will be hereinafter referred to as the “spacevector”.

The magnitude of the space vector v1 is determined based on themagnitude of the difference vector V3, and the direction of the spacevector v1 is determined based on the direction of the difference vectorV3. Specifically, the space vector v1 is calculated by Expression 2below:

v1x=B×V3X

v1y=0

v1z=B×V3Y.  Exp. 2

As shown in Expression 2, the value of the x component of the spacevector is obtained by multiplying the value of the X component of thedifference vector by a predetermined adjustment value B. Similarly, thevalue of the z component of the space vector is obtained by multiplyingthe value of the Y component of the difference vector by the adjustmentvalue B. The value of the y component of the space vector is set to beequal to the height of the ground (i.e., zero). Thus, the differencevector V3 is converted to the space vector v1 parallel to the xz planeof the game space. The component in the horizontal direction on thescreen corresponds to the component in the x-axis direction in the gamespace (the direction displayed in the horizontal direction on thescreen). The component in the vertical direction on the screencorresponds to the component in the z-axis direction in the game space(the direction displayed in the vertical direction at the center of thescreen). Thus, in the present embodiment, the space vector can be easilycalculated from the difference vector with a small amount ofcalculation.

Although the start point of the vector v1 coincides with the point ofsight in FIG. 13, the start point of the vector v1 is a positiondetermined based on the position of the player character (step S20 to bedescribed later), and may not always coincide with the point of sight.This is because after the display area is moved by a player's touchinput, the point of sight and the position of the player character maynot always coincide with each other.

Then, in step S20, the position of the target point is determined basedon the space vector converted in step S19. Specifically, the position ofthe target point is determined based on the direction and the magnitudeof the space vector with respect to a fixed point in the game space. Thefixed point is a point in the game space determined based on theposition of the player character. The fixed point is fixed in a sensethat “it is fixedly set under the condition that the position of theplayer character is fixed”, and it does not have to be always fixed at aparticular position in the game space. The position of the fixed pointchanges as the position of the player character changes. In theillustrated example, the fixed point is set at the position of theplayer character. Thus, the new target point is at a position away fromthe player character by the magnitude of the space vector (distance) inthe direction of the space vector. The CPU core 21 calculates theposition of the target point referring to the character position data 50stored in the RAM 24 and the space vector calculated in step S19. Thedata of the position of the target point calculated in step S20 isstored in the RAM 24 as the updated movement parameter data 58. Step S20is followed by step S23.

If the determination result from step S11 or that from step S12 isnegative, the process proceeds to step S21. In step S21, it isdetermined whether or not the current target point is at the position ofthe player character in the game space. Specifically, the CPU core 21refers to the character position data 50 and the movement parameter data58 stored in the RAM 24, and determines whether or not the position(coordinates) of the character position data 50 is the same as that ofthe movement parameter data 58. If the positions are the same, it isdetermined that the target point is at the position of the playercharacter. If the positions are not the same, it is determined that thetarget point is not at the position of the player character. If it isdetermined that the target point is at the position of the playercharacter, the process proceeds to step S24, skipping steps S22 and S23.If it is determined that the target position is at the position of theplayer character, the process proceeds to step S22.

In step S22, the target point is set at the position of the character.Specifically, the CPU core 21 updates the movement parameter data 58stored in the RAM 24 to the position (coordinates) represented by thecharacter position data 50. Where the player character is using an itemother than a bow and arrow or where there is no touch input, the targetpoint is set at the position of the player character through steps S21and S22, whereby the player character is displayed at the center of thescreen. Step S22 is followed by step S23.

In step S23, the movement vector is calculated based on the currentposition of the point of sight and the position of the target point. Asdescribed above, the movement vector is a vector representing thedirection in which the point of sight (display area) is moved and theamount by which it is moved per unit time (e.g., per frame). FIG. 14illustrates the process of step S23 shown in FIG. 8. In FIG. 14, thepoint p1 represents the current position of the point of sight, and thepoint p2 represents the position of the target point. The vector v1 isthe space vector calculated in step S19. In step S23, the CPU core 21calculates a vector v2 by dividing each component of the vector v1 by apredetermined number (the predetermined number is 3 in FIG. 14). Thevector v2 is the movement vector. The CPU core 21 stores the data of thecalculated movement vector in the RAM 24 as the movement vector data 59.

As shown in step S23, in the present embodiment, a vector V5 obtained bydividing the vector v1 by a predetermined number is used as the movementvector, whereby the display area is moved to the target position over aplurality of frames (the same number of frames as the predeterminednumber). Thus, it is possible to prevent the abrupt movement of thedisplay area on the game screen, which may be difficult for the playerto follow. In other embodiments, the vector v1 may be used as themovement vector if the magnitude of the vector v1 is less than or equalto a predetermined value. In other embodiments, the predetermined numbermay be 1. Step S23 is followed by step S24.

In step S24, the point of sight is moved according to the movementvector calculated in step S23. Specifically, the CPU core 21 updates thedata representing the point of sight included in the virtual camera data57 stored in the RAM 24 to data representing the new position(coordinates) of the point of sight after it is moved. Moreover, thedata representing the position of the virtual camera is updatedaccording to the new position of the point of sight after it is moved.After step S24, the CPU core 21 exits the display area determiningprocess.

Referring back to FIG. 7, the game image is displayed in step S6.Specifically, the CPU core 21 produces an image of the game space asviewed in the viewing direction from the position of the virtual camera,and displays the produced image on the second LCD 12. Since theparameters of the virtual camera (the position of the point of sight andthe position of the virtual camera) have been updated in step S24, thedisplay area has been moved in the displayed image. Step S6 is followedby step S7.

In step S7, it is determined whether or not the game is over. Thedetermination of step S7 is made based on, for example, whether theplayer character has no remaining physical strength or whether theplayer character has taken down all the enemy characters. If it isdetermined in step S7 that the game is over, the CPU core 21 exits thegame process shown in FIG. 7. If it is determined that the game is notover, the process proceeds to step S2, and then steps S2 to S7 arerepeated until it is determined in step S7 that the game is over. Thegame process is as described above in detail.

In the present embodiment, an upper limit value is set for thedifference vector and a correction operation is performed in step S17 sothat the magnitude of the difference vector is within the upper limitvalue. In other embodiments, the upper limit value may be set for thespace vector (the vector v1 shown in FIG. 13) obtained by converting thedifference vector. In the present embodiment, a correction operation foradjusting the proportion between the magnitudes of the components of thedifference vector is performed in step S18. In other embodiments, acorrection operation for adjusting the proportion between the magnitudesof the components of the space vector may be performed. Specifically,the x component and the z component of the space vector may be correctedso as to increase the proportion of the z component with respect to thex component. Thus, the space vector can be calculated so that theproportion of the z-direction component of the space vector with respectto the x-direction component thereof is greater than the proportion ofthe Y-direction component of the difference vector with respect to theX-direction component thereof.

In the game process described above, the components of the differencevector are corrected in step S18 so as to increase the proportion of theY component of the difference vector with respect to the X componentthereof. In the present embodiment, when the difference vector isconverted to the space vector in the game space in step S19, theadjustment value used for converting the X component of the differencevector to the x component of the space vector is the same as theadjustment value used for converting the Y component of the differencevector to the z component of the space vector. Therefore, without stepS18, the ratio between the vertical direction (the Y component) and thehorizontal direction (the X component) of the difference vector will be,as it is, the ratio between the vertical direction (the z component) andthe horizontal direction (the x component) of the space vector. However,in the present embodiment, the viewing direction of the virtual camerais not perpendicular to the ground but is inclined in the Y-axisdirection of the screen (the viewing direction in the virtual space isparallel to the Y-axis direction on the screen), whereby the displayedgame space is compressed with respect to the Y-axis direction of thescreen. Therefore, when the display area is moved by the same distance(distance in the game space) in the x-axis direction and in the z-axisdirection, the amount by which the display area is moved in the z-axisdirection on the screen will be smaller. Thus, if the ratio between thevertical direction and the horizontal direction of the difference vectoris used, as it is, as the ratio between the vertical direction and thehorizontal direction of the space vector, the amount by which thedisplay area is moved in the vertical direction on the screen will besmaller. Then, the direction inputted by the player (i.e., the directionof the difference vector) does not match with the direction in which thedisplay area is actually moved, whereby the player may feel awkward.

In view of this, in the present embodiment, the component of the Y-axisdirection of the difference vector (the direction on the screencorresponding to the viewing direction of the virtual camera) isincreased with respect to the component of the X-axis direction. Thus,the display area is moved at the same ratio as the ratio between thevertical direction and the horizontal direction of the differencevector, whereby it is possible to reduce or eliminate such awkwardnessthat may be felt by the player.

FIGS. 15 and 16 show how the display area is moved when the playertouches a lower right position on the screen. Note that in FIGS. 15 and16, a point representing a position on the screen is denoted by areference character with a capital letter “P”, and a point representinga position in the game space is denoted by a reference character with asmall letter “p”. Similarly, in FIGS. 15 and 16, a two-dimensionalvector on the screen is denoted by a reference character with a capitalletter “V”, and a vector in the game space is denoted by a referencecharacter with a small letter “v”.

FIG. 15 shows the game screen immediately after the player performs atouch input operation. In FIG. 15, since it is immediately after thetouch input, the player character 41 is displayed at the center of thescreen. Specifically, the position p21 of the player character 41corresponds to (is displayed at) the reference position P11 on thescreen. When the player touches the position P12 on the screen, a vectorV11 extending from the reference position P11 to the input position P12is calculated as the difference vector (step S15). Then, according tothe area 61 represented by the upper limit value, the difference vectoris corrected to a vector V12 (step S17). The vector V12 is furthercorrected to a vector V13 so as to increase the proportion of the Ycomponent with respect to the X component (step S18). Then, thetwo-dimensional vector V13 on the screen is converted to a space vectorv21 in the game space (step S19). A target position p22 in the gamespace is determined based on the space vector v21 with respect to theposition p21 of the player character in the game space (step S20). Thus,the display area is moved so that the target position p22 is displayedat the center of the screen.

FIG. 16 shows the game screen a predetermined number of frames afterFIG. 15 while the input position has remained unchanged. In FIG. 16, thepoint of sight is positioned at the target position p22, and the playercharacter 41 is displayed near the upper left corner of the screen.Since the input position on the screen has remained unchanged from FIG.15, the difference vector V13 is calculated in a similar manner to thatin the case of FIG. 15. Moreover, the space vector v21 is calculatedfrom the difference vector V13 in a similar manner to that in the caseof FIG. 15. Therefore, the target position p22 is similar to that in thecase of FIG. 15 (in the game space). In FIG. 16, since the point ofsight has already been moved to the target position p22, the displayarea is not moved.

Thus, in the present embodiment, the difference vector used for movingthe display area in the game space is determined based on the referenceposition on the screen and the input position on the screen. Since thedifference vector is determined based on two positions on the screen,the magnitude of the difference vector is necessarily limited. Moreover,the difference vector is converted to a vector in the game space, andthe display area is moved based on the obtained vector with respect to afixed point in the game space. Therefore, the display area will be movedin an area within a predetermined distance from the fixed point, therebylimiting the area across which the display area is moved. By setting thefixed point at the position of the player character, the area acrosswhich the display area is moved is limited to an area centered about theposition of the player character, whereby the player character canalways be displayed within the screen.

As described above, according to the present embodiment, the displayarea can be moved according to the input position specified by theplayer, whereby the game screen can be displayed with a display areathat is preferable for the player at any time. By limiting the magnitudeof the difference vector to the upper limit value, it is possible toprevent the display area from being moved continuously in a certaindirection. By adjusting the proportion between the X component and the Ycomponent of the difference vector, it is possible to reduce theawkwardness that the player may feel when the display area is moved.

In the present embodiment, the player character is prevented from movingout of the screen by limiting the magnitude of the difference vector tothe upper limit value. In other embodiments, whether or not the playercharacter is within the display area may be determined before moving thedisplay area so that the display area is moved only when the playercharacter is within the display area. Specifically, after step S23, anoperation may be performed for determining whether or not the playercharacter is within the display area after being moved. The process mayproceed to step S24 if the player character is within the display area,or may skip step S24 if the player character is not within the displayarea. In this case, steps S16 and S17 are not needed. In otherembodiments, in the operation of setting the target position based onthe difference vector (step S20), the target position may be set so thatit is positioned within a predetermined range from the position of theplayer character. Also in this case, steps S16 and S17 are not needed.

In the present embodiment, the position of the virtual camera is movedas a specific method for moving the display area. The method for movingthe display area is not limited to any particular method. For example,the position and the viewing direction of the virtual camera may bechanged, or only the viewing direction of the virtual camera may bechanged. In the present embodiment, the position of the virtual camerais moved only in the x-axis direction and in the z-axis direction. Inother embodiments, the position of the virtual camera may be moved alsoin the y-axis direction.

While a three-dimensional virtual space is displayed on the screen inthe present embodiment, the virtual space may be two-dimensional. Alsoin the case of a two-dimensional virtual space, the target point is setin the virtual space based on the difference vector, and the displayarea is moved so that the target point is displayed at a referenceposition on the screen (e.g., the center of the screen), as in thepresent embodiment.

While the present embodiment is directed to a case where the imageprocessing program is used as a video game program, the presentinvention is not limited to video game applications, but is applicableto any application in which a virtual space is displayed on a screen,wherein the display area is moved.

While a touch panel is employed as the input device in the presentembodiment, the input device may be any other suitable pointing devicewith which it is possible to detect a position on the display screenbeing specified by the user. For example, the input device may be amouse, or the like, or an optical pointing device to be held by theuser, which includes an image sensing device for taking an image of thedisplay screen itself or markers provided around the display screen,based on which the position on the display screen being pointed by thepointing device is calculated.

As described above, the present invention can be used in an imageprocessing program and an image processing device, aiming at, forexample, allowing the user to freely adjust a display area in a virtualspace.

While the invention has been described in detail, the foregoingdescription is in all aspects illustrative and not restrictive. It isunderstood that numerous other modifications and variations can bedevised without departing from the scope of the invention.

What is claimed is:
 1. A non-transitory computer-readable storage mediumhaving stored therein an image processing program to be executed by acomputer of an image processing device, the image processing devicecomprising a pointing device capable of specifying a coordinate on ascreen of a display device and configured to display on the screen apredetermined display area in a virtual space including a predeterminedobject, the image processing program comprising instructions causing thecomputer to perform: determining whether coordinate specification by thepointing device has been performed; and switching setting of the displayarea by executing, upon determining that the coordinate specificationhas been performed, a first setting in which a display area to bedisplayed on the screen in the virtual space is set based on a positionof the object and an input coordinate specified in the coordinatespecification, and by executing, upon determining that the coordinatespecification has not been performed, a second setting in which thedisplay area is set based on the position of the object.
 2. Thenon-transitory computer-readable storage medium according to claim 1,wherein in the first setting, the display area is set such that more ofan area in a direction from the position of the object toward a positionof the input coordinate is displayed compared with that before thecoordinate specification has been performed.
 3. The non-transitorycomputer-readable storage medium according to claim 1, wherein thedetermining of coordinate specification and the switching of setting ofthe display area are continuously performed and the switching of settingof the display area is performed instantaneously in accordance with achange in presence/absence of the coordinate specification performed bya user.
 4. The non-transitory computer-readable storage medium accordingto claim 1, wherein the image processing program comprises furtherinstructions causing the computer to further perform: executing a firstcontrol in which in accordance with the display area set in the firstsetting, an image of the virtual space is generated so as to graduallymove toward the display area, and the image is displayed on the screenof the display device.
 5. The non-transitory computer-readable storagemedium according to claim 1, wherein the image processing programfurther comprises instructions causing the computer to further perform:executing a second control in which in accordance with the display areaset in the second setting, an image of the virtual space is generated soas to gradually move toward the display area, and the image is displayedon the screen of the display device.
 6. The non-transitorycomputer-readable storage medium according to claim 1, wherein in thefirst setting, the display area is set so that the object will not beoutside the display area.
 7. The non-transitory computer-readablestorage medium according to claim 1, wherein in the second setting, thedisplay area is set so that the object will not be outside the displayarea.
 8. The non-transitory computer-readable storage medium accordingto claim 1, wherein the pointing device is a touch panel.
 9. An imageprocessing device configured to display, on a screen of a displaydevice, a predetermined display area in a virtual space including apredetermined object, the image processing device comprising: a pointingdevice capable of specifying a coordinate on a screen of the displaydevice; and coordinate specification determining circuitry configured todetermine whether coordinate specification by the pointing device hasbeen performed; and display area switching circuitry configured toswitch setting of the display area by setting, when the coordinatespecification determining circuitry has determined that the coordinatespecification has been performed, a display area to be displayed on thescreen in the virtual space based on a position of the object and aninput coordinate specified in the coordinate specification, and bysetting, when the coordinate specification determining circuitry hasdetermined that the coordinate specification has not been performed, thedisplay area based on the position of the object.
 10. An imageprocessing system configured to display, on a screen of a displaydevice, a predetermined display area in a virtual space including apredetermined object, the image processing system comprising: a pointingdevice capable of specifying a coordinate on a screen of the displaydevice, the image processing system configured to: determine whethercoordinate specification by the pointing device has been performed; andswitch setting of the display area by setting, upon determining that thecoordinate specification has been performed, a display area to bedisplayed on the screen in the virtual space based on a position of theobject and an input coordinate specified in the coordinatespecification, and by setting, upon determining that the coordinatespecification has not been performed, the display area based on theposition of the object.
 11. An image processing method executed by acomputer of an image processing device, the image processing devicecomprising a pointing device capable of specifying a coordinate on ascreen of a display device and configured to display on the screen apredetermined display area in a virtual space including a predeterminedobject, the image processing method comprising: determining whethercoordinate specification by the pointing device has been performed; andswitching setting of the display area by executing, upon determiningthat the coordinate specification has been performed, a first setting inwhich a display area to be displayed on the screen in the virtual spaceis set based on a position of the object and an input coordinatespecified in the coordinate specification, and by executing, upondetermining that the coordinate specification has not been performed, asecond setting in which the display area is set based on the position ofthe object.